package com.jyy.prefabricated.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.entity.Course;
import com.jyy.prefabricated.entity.QuestionBank;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * @version 1.0.0
 * @author: zjj
 */

@Data
public class ProjectDto {

    private Integer id;

    @NotNull(message = "项目分类不能为空")
    private Integer categoryId;

    @NotNull(message = "项目名称不能为空")
    private String name;

    private Integer type;

    private String examInfo;

    private String certificate;

    private Integer status;

//    @NotNull(message = "学习人数不能为空")
    private Integer studyCount;

    @NotNull(message = "可分配数量不能为空")
    private Integer distributionNum;

    @NotNull(message = "项目封面不能为空")
    private String pic;

//    @NotNull(message = "售价不能为空")
    private BigDecimal price;

    @NotNull(message = "原价不能为空")
    private BigDecimal listPrice;

    @NotNull(message = "科目一售价不能为空")
    private BigDecimal onePrice;

    @NotNull(message = "科目二售价不能为空")
    private BigDecimal twoPrice;

    @NotNull(message = "项目截止时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date deadline;
    /**
     * 库存数量
     */
    private Integer stock;

    /**
     * 广告位位置
     */
    private Integer position;

    /**
     * 时间单位
     */
    private Integer unit;

    private List<Integer> documentCourseIds = new ArrayList<>();

    private List<Integer> recordingCourseIds = new ArrayList<>();

    private List<Integer> questionBankIds = new ArrayList<>();

    @NotNull(message = "项目简介不能为空")
    private String content;

    private Boolean deleted = false;
}
